package com.bit.mybatis.mapper;

import com.bit.mybatis.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleMapper {
    @Select("select ta.* , tb.username, tb.age, tb.gender" +
            " from articleinfo ta" +
            " left join user_info tb on ta.uid = tb.id" +
            " where ta.id = #{articleId}")
    ArticleInfo selectById(Integer articleId);
}
